package cn.xej.demo;

import cn.xej.demo.executor.TeamSwitchExecutor;
import cn.xej.demo.service.impl.CarServiceImpl;
import cn.xej.demo.service.impl.DogServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@PutResource(name = "calss")
@RestController
public class HelloController {


    @PostMapping("abc")
    public void carTest(@RequestBody Car car){
        System.out.println(car);
    }

//    private AnimalManagerFactory animalManagerFactory;
//
//    public HelloController(AnimalManagerFactory animalManagerFactory){
//        this.animalManagerFactory = animalManagerFactory;
//    }




    @GetMapping("/eat")
    @PutResource(name = "sss")
    public void eat(@PutResource(name = "file") String file){
        System.out.println("钓鱼");
//        animalManagerFactory.eat("dogServiceImpl","骨头");
    }

//    @GetMapping("/eat1")
//    public void eat1(){
//        animalManagerFactory.eat("carServiceImpl","鱼");
//    }
//
//
//    @GetMapping("/hello")
//    public String hello(){
//        System.out.println("avc");
//        return "abc";
//    }

}
